extends Node2D

# 武器通用脚本, 所有武器必须拥有的特性

@export var bulletSpeed = 100 	## 子弹飞行速度
@export var bulletPower = 1		## 子弹威力

# 加载瞄准点
@onready var shootPosition = $ShootPosition
@onready var state = $"../../State"
@onready var fireTimer = $Timer
@onready var audio = $FireAudio

var isFire = false
var power = 0

func _ready():
	fireTimer.connect("timeout", timeOutCallback)


func timeOutCallback():
	isFire = false

func _process(_delta):
	# 让武器的方向朝向鼠标的坐标
	look_at(get_global_mouse_position())
